Varying data redundancy in storage systems

ABSTRACT

A disk drive is disclosed that varies its data redundancy policy for caching data in non-volatile solid-state memory as the memory degrades. As the non-volatile memory degrades, the redundancy of data stored in the non-volatile memory can be increased to counteract the effects of such degradation. Redundant data can be used to recover data stored in the non-volatile memory in case of a data corruption. Performance improvements and reduced costs of disk drives can thereby be attained.

BACKGROUND

1. Technical Field

This disclosure relates to disk drives, including but not limited to hybrid hard drives. More particularly, the disclosure relates to systems and methods for varying data redundancy in solid-state memory of a disk drive.

2. Description of the Related Art

Non-volatile memory devices typically provide better performance for reading and writing data than magnetic media. Accordingly, in storage devices it is advantageous to utilize non-volatile memory for storing data. However, a problem with using non-volatile memory for storing data is that reliability of non-volatile memory degrades over time.

Non-volatile memory devices can typically endure a limited number of write cycles over their useful life. Various factors can contribute to data errors in non-volatile memory devices, which include charge loss or leakage over time, read disturb, and device wear caused by program-erase cycles. Non-volatile memory degradation can cause stored data to be corrupted. For example, when the number of bit errors on a read operation exceeds the ECC (error correction code) correction's capability of the non-volatile memory device, a read operation fails.

BRIEF DESCRIPTION OF THE DRAWINGS

Systems and methods that embody the various features of the invention will now be described with reference to the following drawings, in which:

FIG. 1 is a block diagram illustrating a storage device that implements mechanisms for varying data redundancy in accordance with one embodiment of the invention.

FIG. 2 is a flow diagram illustrating mechanisms for varying data redundancy in accordance with one embodiment of the invention.

FIG. 3 is a flow diagram illustrating storing data in non-volatile memory in accordance with one embodiment of the invention.

FIGS. 4-6 illustrate several examples for varying data redundancy in accordance with some embodiments of the invention.

DETAILED DESCRIPTION OF SPECIFIC EMBODIMENTS

While certain embodiments are described, these embodiments are presented by way of example only, and are not intended to limit the scope of protection. Indeed, the novel methods and systems described herein may be embodied in a variety of other forms. Furthermore, various omissions, substitutions and changes in the form of the methods and systems described herein may be made without departing from the scope of protection.

Overview

Non-volatile memory devices (NVM) (e.g., flash memory and other types of solid-state memory devices) store information in an array of memory cells. In single-level cell (SLC) non-volatile memory, each cell stores a single bit of information. In multi-level cell (MLC) non-volatile memory, each cell stores two or more bits of information. Non-volatile memory has a limited usable life that is measured by the number of times data can be written to a specific NVM location. As NVM wear increases (e.g., number of program-erase cycles increases), the reliability and data retention of the NVM decreases. MLC non-volatile memory (e.g., MLC NAND) is cheaper than SLC non-volatile memory, but tends to have slower access time, lower endurance, and lower data retention.

To improve performance, some disk drives take advantage of the speed of non-volatile memory to store certain data in non-volatile memory. This data can include frequently accessed data and data accessed at start-up. Disk drives that comprise non-volatile memory cache in addition to magnetic storage are referred to as “hybrid hard disk drives” or “hybrid hard drives” throughout this disclosure. In some hybrid hard drives, MLC NVM can be a good choice for cache storage due to its low cost and high storage density. Non-volatile memory is typically used both as read cache (e.g., a copy of data exists in magnetic storage) and write cache (e.g., data stored in NVM cache is a more recent version than data stored in magnetic storage).

In some embodiments of the present invention, redundancy of data stored in an NVM cache of a hybrid hard drive is increased as the NVM wears out. When reliability (e.g., error rate) of the NVM device falls below a threshold, data redundancy can be implemented to counteract the degradation of reliability of the NVM. In some embodiments, redundancy can be implemented using RAID (Redundant Array of Independent Disks) techniques. For example, when data mirroring or shadowing (e.g., RAID 1) is used, two or more copies of data are written to different locations in the NVM. In case data stored in one location becomes corrupted (e.g., error rate exceeds the ECC capability) and cannot be recovered, a “mirror” copy of the data is used instead. As another example, when RAID parity (e.g., RAID 3, 4, 5, 6, 50, 60, etc.) is used, redundant information or “parity” data is created and written, along with data, to the NVM. When data stored in the NVM becomes corrupted and cannot be recovered, parity data can be is used to reconstruct the data. In some embodiments, varying redundancy of data stored in non-volatile memory cache allows the hybrid hard drive to continue providing improved performance despite the degradation of the NVM's reliability, and even as the NVM nears the end of its usable life. In addition, the effective endurance of the NVM can be extended, which can correspond to using an NVM module that guarantees a smaller number of program-erase cycles that can be endured. This can result in cost reductions of the hybrid hard drive. Moreover, caching data in the non-volatile memory can result in improved power consumption.

System Overview

FIG. 1 illustrates a storage system 100 that implements improved caching mechanisms in accordance with one embodiment of the invention. As shown, a storage system 120 (e.g., a hybrid hard drive) includes a controller 130, non-volatile storage memory module 150, which comprises cache 152, and magnetic storage module 160, which comprises magnetic media 164 (e.g., a magnetic disk). The non-volatile memory module 150 can comprise one or more non-volatile solid-state memory arrays. The controller 130 can be configured to receive data and/or storage access commands from a storage interface module 112 (e.g., a device driver) in a host system 110. Storage access commands communicated by the storage interface 112 can include write and read commands issued by the host system 110. Read and write commands can specify a logical block address in the storage system. The controller 130 can execute the received commands in the non-volatile memory module 150 or in the magnetic storage module 160. In one embodiment, the controller can include memory (e.g., DRAM) for storing data, such as system tables.

The non-volatile memory module 150 is preferably implemented using NAND flash memory devices. Other types of solid-state memory devices can alternatively be used, including flash integrated circuits, Chalcogenide RAM (C-RAM), Phase Change Memory (PC-RAM or PRAM), Programmable Metallization Cell RAM (PMC-RAM or PMCm), Ovonic Unified Memory (OUM), Resistance RAM (RRAM), NAND memory, NOR memory, EEPROM, Ferroelectric Memory (FeRAM), or other discrete NVM (non-volatile memory) chips. In one embodiment, the memory devices are preferably MLC devices, although SLC memory devices, or a combination of SLC and MLC devices may be used in some embodiments.

Storage system 120 can store data communicated by the host system 110. That is, the storage system 120 can act as memory storage for the host system 110. To facilitate this function, the controller 130 can implement a logical interface. Logical interface can present to the host system 110 storage system's memory as a set of logical addresses (e.g., contiguous address) where data can be stored. Internally, the controller 130 can map logical addresses to various physical memory addresses in the magnetic media 164 and/or the non-volatile memory module 150.

In one embodiment, at least a portion of the non-volatile memory module 150 can be used as cache 152. In another embodiment, entire non-volatile memory module 150 can be used as cache. The controller 130 can store data communicated by the host system 110 in the non-volatile memory. In one embodiment, non-volatile memory cache 152 can be used as a read cache and/or a write cache. When the non-volatile memory is used as a read cache, a copy of data also exists in the magnetic storage 160. When non-volatile memory is used as a write cache, data stored in non-volatile memory is the most recent version than data stored in the magnetic storage 160. To improve performance of the storage system 120 and/or host system 110, in some embodiments, various types of data can be stored in non-volatile memory cache, including frequently accessed data, data accessed at start-up (e.g., following a reset or power down), system data, sequentially accessed data, etc.

Varying Data Redundancy

FIG. 2 illustrates mechanisms for varying data redundancy in accordance with one embodiment of the invention. The process 200 can be implemented by the controller 130 of a storage system 120, such as a hybrid disk drive. In one embodiment, the process 200 is executed when a new non-volatile memory data storage unit is allocated for data to be written to non-volatile memory (e.g., in response to monitoring of reliability of non-volatile memory). The process 200 starts in block 202 where a reliability measure of non-volatile memory is calculated. In one embodiment, the reliability measurement can correspond to or reflect the remaining usable life of the non-volatile memory. The remaining usable life can correspond to the number of remaining program-erase cycles that the NVM can endure. For example, certain types of NAND NVM can endure between 3,000 and 100,000 program-erase cycles. In another embodiment, the remaining usable life (or reliability measure) can be determined based partly or wholly on the total number of bytes that have been written to non-volatile memory.

In one embodiment, the remaining usable life (or reliability measure) can be based partly or wholly on a number of errors encountered when reading data stored in non-volatile memory. Non-volatile memory can degrade and wear out, which can cause corruption of stored data. With NAND flash memory, for example, data corruption can be caused by a program disturb (e.g., data not intended to be programmed is nonetheless changed by a program operation directed to adjacent NVM blocks), read disturb (e.g., data not intended to be read is changed by a read operation directed to adjacent NVM pages), data loss (e.g., charge loss over an extended storage period), etc. Various error correction code (ECC) mechanisms can be used for detecting and correcting data corruption. In one embodiment, the number of bit corruptions detected and/or fixed by the ECC mechanism can be monitored during the execution of read operations. The number of bit corruptions can provide a measure of remaining usable life of non-volatile memory. This measure can be determined, for example, by comparing the average number of bits corruptions to a set of tiered thresholds.

The remaining usable life (or reliability measure) can also be determined based partially or wholly on voltage threshold levels or voltage reference values selected or determined when reading data from MLC flash memory. The remaining usable life can correspond to a voltage threshold level selected from a range of possible threshold levels during reading data so that data errors are reduced or minimized. In another embodiment, the remaining usable life can correspond to the adjustment of programming algorithm parameters (e.g., programming time, erase time, etc.) when storing data in non-volatile memory.

In block 204, the process determines whether data should be mirrored. Alternatively, some initial redundancy (e.g., parity or mirroring) could be used to account for reliability overhead needed to account for to page read failures commonly encountered in new NVM modules. In one embodiment, the process 200 compares the reliability measurement determined in block 202 to a current mirroring threshold. The current mirroring threshold can be a preset value (e.g., a value corresponding to initial redundancy) or can, for example, be adjusted as non-volatile memory degrades. If the reliability measurement is below the current mirroring threshold, the process transitions to block 208 where it determines a mirroring density that corresponds to (e.g., is required to meet) the reliability measurement. In one embodiment, mirroring density can correspond to a number of copies of data that are written to non-volatile memory. For example, more copies of data (e.g., 2, 3, 4, etc.) can be written to non-volatile memory as its reliability degrades. After the mirroring density is determined, the process transitions to block 214 where the mirroring level is set to the mirroring density. After this operation is completed, the process transitions to block 218 where an allocation unit is created based on the determined mirroring density. In one embodiment, the format of the allocation unit reflects the mirroring density (e.g., number of copies of data to be written to non-volatile memory).

In one embodiment, if the reliability measurement is above (or equal to) the current mirroring threshold, the process transitions to block 206 where it compares the reliability measurement determined in block 202 to a current parity threshold. The parity threshold can be a preset value (e.g., a value corresponding to the initial redundancy) or can, for example, be adjusted as non-volatile memory degrades. If the reliability measurement is below the current parity threshold, the process transitions to block 212 where it determines a parity density that corresponds to (e.g., is required to meet) the reliability measurement. In one embodiment, parity density can correspond to a number of data sectors (e.g., non-volatile memory pages) for which parity data is created and stored in non-volatile memory. For example, parity data can be created for a group of N storage units (e.g., pages), where N can be set to 32, 16, 8, 4, or 2. In one embodiment, parity density is increased (i.e., N is decreased) as the reliability of non-volatile memory degrades. After the parity density is determined, the process transitions to block 216 where the parity level is set to the parity density. After this operation is completed, the process transitions to block 218 where the allocation unit is created based on the determined parity density. In one embodiment, the format of the allocation unit reflects the parity density (e.g., number of pages for which parity data is created).

In one embodiment, when the remaining usable life is determined to be above (or equal to) the current mirroring and parity thresholds, the process 200 transitions to block 210. No data redundancy can be utilized since the non-volatile memory has been determined to have sufficient reliability. Alternatively, some initial redundancy could be used. The process transitions to block 218 where the allocation unit is created based on no redundancy or on initial redundancy. In one embodiment, the format of the allocation unit reflects no redundancy (e.g., no mirroring and no parity data). In another embodiment, the format of the allocation unit reflects initial redundancy (e.g., initial parity or mirroring). Once the allocation unit has been created, the process 200 terminates.

In one embodiment, the remaining usable life can be determined by a signal processing subsystem. The non-volatile memory module 150 can include a bridge device coupled with non-volatile memory module via an interface such as ONFI. The bridge device can be further configured to communicate with the controller 130 over a high speed interface such as PCIe and to provide to the controller physical, page-level access/control to non-volatile memory. The bridge device can perform basic signal processing and channel management of non-volatile memory. This architecture is described in a co-pending patent application Ser. No. 13/226,393, entitled “SYSTEMS AND METHODS FOR AN ENHANCED CONTROLLER ARCHITECTURE IN DATA STORAGE SYSTEMS,” filed Sep. 6, 2011, the disclosure of which is hereby incorporated by reference in its entirety. In other embodiments, a bridge device may not be used and the non-volatile memory module 150 may be managed directly by the controller 130.

As explained above, the process 200 is preferably executed when a new non-volatile memory data storage unit is allocated for data to be written to non-volatile memory (e.g., in response to monitoring of reliability of non-volatile memory). Data to be written can be communicated by the host via a write command. FIG. 3 illustrates storing data in non-volatile memory in accordance with one embodiment of the invention. The process 300 can be implemented by the controller 130 of a storage system 120. The process 300 starts in block 302 where it determines whether a data storage unit to be written to non-volatile memory is a newly allocated unit. In one embodiment, non-volatile memory data storage units of a different format than the current format cannot be used in the middle of a write operation.

If the unit is not a newly allocated unit, the process transitions to block 306 where it sets a redundancy level to the already determined allocation unit format (e.g., already determined mirroring level, parity level, or no redundancy). The process transitions to block 308 where data is written to non-volatile memory. If, in block 302, it is determined that the unit is a newly allocated unit, the process transitions to block 304 where it sets the allocation unit format to the redundancy level to the level determined in blocks 210, 214, and/or 216 of FIG. 2. The process transitions to block 308 where data is stored in non-volatile memory. The process 300 terminates when data is written.

Examples of Varying Data Redundancy

FIG. 4 illustrates an example 400 of varying data redundancy according to one embodiment. As is shown, threshold 402 reflects that the non-volatile memory 150 is fully reliable (e.g., the non-volatile memory has substantially its entire usable life left). No data redundancy is needed to be utilized while reliability of the non-volatile memory is above threshold 404. Alternatively, some initial redundancy (e.g., parity) could be used to account for reliability overhead needed to account for to page read failures commonly encountered in new NVM modules. When the reliability of the non-volatile memory falls below the threshold 404, parity is used or can be increased for redundancy. When the reliability of the non-volatile memory falls below threshold 406, mirroring is used for redundancy, as mirroring allows for recovery from more severe types of data corruption. Mirroring may thereafter be used until the non-volatile memory reaches the end of its life, as reflected by threshold 408. Although mirroring is used in the embodiment of FIG. 4, other forms of increased redundancy may alternatively be used; for example, an ECC level may alternatively be used. The ECC level may provide for increased redundancy relative to the use of parity, but less redundancy than is provided by mirroring.

FIG. 5 illustrates an example 500 of varying data redundancy according to another embodiment. As is shown, threshold 502 reflects that the non-volatile memory 150 is fully reliable (e.g., non-volatile memory has substantially its entire usable life left). No data redundancy is needed while reliability of non-volatile memory is above threshold 504. Alternatively, some initial redundancy (e.g., parity) could be used to account for reliability overhead needed to account for to page read failures commonly encountered in new NVM modules. When the reliability of the non-volatile memory falls below threshold 504, parity is used or can be increased for redundancy. Parity density can be increased as the reliability of the non-volatile memory decreases. In particular, while reliability is between thresholds 504 and 506, parity data is created for every 16 storage units (e.g., page). When the reliability decreases to between thresholds 506 and 508, parity data is created for every 8 storage units. When the reliability decreases to between thresholds 508 and 510, parity data is created for every 4 storage units. When the reliability decreases to between thresholds 510 and 512, parity data is created for every 2 storage units.

When the reliability falls below threshold 512, mirroring is used for redundancy. In particular, while reliability is between thresholds 512 and 514, one additional copy of data is stored in non-volatile memory. When reliability decreases to being between thresholds 514 and 516, two additional copies of data are stored in non-volatile memory. When reliability decreases to being between thresholds 516 and 518, four additional copies of data are stored in non-volatile memory. Threshold 518 reflects the end of life of non-volatile memory.

FIG. 6 illustrates an example 600 of varying data redundancy according to another embodiment. As is shown, threshold 602 reflects that the non-volatile memory 150 is fully reliable (e.g., non-volatile memory has substantially its entire usable life left). No data redundancy is needed while reliability of non-volatile memory is above threshold 604. Alternatively, some initial redundancy (e.g., parity) could be used to account for reliability overhead needed to account for to page read failures commonly encountered in new NVM modules. When the reliability of non-volatile memory falls below threshold 604, parity is used or can be increased for redundancy. When the reliability of non-volatile memory falls below threshold 606, mirroring is used for redundancy. Mirroring is used as long as the non-volatile memory reliability exceeds threshold 608. However, when the reliability falls below threshold 608, which reflects that the non-volatile memory has degraded to the point where it has become unusable, data is no longer written to the non-volatile memory. In one embodiment, data already stored in non-volatile memory can be transferred to the magnetic media. In another embodiment, data already stored in non-volatile memory can remain there (e.g., the non-volatile memory is used as read cache) until non-volatile memory reaches the end of its life, as reflected by threshold 610.

As will be apparent, numerous other levels and types of redundancy can additionally or alternatively be used. For example, in some embodiments, the redundancy level may be increased over time by changing an ECC level or algorithm (or parameters of algorithm) used to generate ECC data.

CONCLUSION

In some embodiments, varying data redundancy allows hybrid hard drives to improve performance and reduce cost. Redundancy of data stored in non-volatile memory can be increased as non-volatile memory degrades. Various types RAID parity and/or mirroring mechanisms can be used depending on the measured reliability of the non-volatile memory. Redundant data can be used to recover data stored in the non-volatile memory in case of data corruption. Varying the redundancy of data stored in the non-volatile memory cache provides performance improvement even as the non-volatile memory's reliability degrades. Costs are reduced because the cheaper non-volatile memory that guarantees a lower number of program-erase cycles can be utilized.

Other Variations

As used in this application, “non-volatile memory” typically refers to solid-state memory such as, but not limited to, NAND flash. However, the systems and methods of this disclosure may also be useful in more conventional hard drives and hybrid drives including both solid-state and hard drive components. The solid-state storage devices (e.g., dies) may be physically divided into planes, blocks, pages, and sectors, as is known in the art. Other forms of storage (e.g., battery backed-up volatile DRAM or SRAM devices, magnetic disk drives, etc.) may additionally or alternatively be used.

Those skilled in the art will appreciate that in some embodiments, other types of redundancy can be implemented. In addition, the actual steps taken in the processes shown in FIGS. 2-6 may differ from those shown in the figures. For example, thresholds depicted in FIGS. 4-6 could be reversed. Depending on the embodiment, certain of the steps described above may be removed, others may be added. Accordingly, the scope of the present disclosure is intended to be defined only by reference to the appended claims.

While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of protection. Indeed, the novel methods and systems described herein may be embodied in a variety of other forms. Furthermore, various omissions, substitutions and changes in the form of the methods and systems described herein may be made. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the protection. For example, the various components illustrated in the figures may be implemented as software and/or firmware on a processor, ASIC/FPGA, or dedicated hardware. Also, the features and attributes of the specific embodiments disclosed above may be combined in different ways to form additional embodiments, all of which fall within the scope of the present disclosure. Although the present disclosure provides certain preferred embodiments and applications, other embodiments that are apparent to those of ordinary skill in the art, including embodiments which do not provide all of the features and advantages set forth herein, are also within the scope of this disclosure. Accordingly, the scope of the present disclosure is intended to be defined only by reference to the appended claims. 

What is claimed is:
 1. A data storage system comprising: a non-volatile solid-state memory configured to store data; and a controller configured to store data in the non-volatile memory, the controller further configured to: determine a reliability measurement of the non-volatile memory; in response to comparing the reliability measurement to at least one reliability threshold, determine a parity level or a mirroring level of the non-volatile memory and set a redundancy level of the non-volatile memory to the determined parity level or the determined mirroring level, the controller being further configured to increase at least one of the parity or the mirroring level when the reliability measurement has been determined to decrease when compared to the at least one reliability threshold; and store the data in the non-volatile memory using the set redundancy level; and wherein increasing the mirroring level comprises increasing a number of copies of the data in a plurality of copies of the data stored in the non-volatile memory, and wherein increasing the parity level comprises increasing a number of parity data units in a plurality of parity data units associated with the data, the plurality of parity units stored in the non-volatile memory along with the data.
 2. The system of claim 1, wherein: the at least one reliability threshold comprises first and second reliability thresholds, the first reliability threshold indicating higher reliability of the non-volatile memory than the second reliability threshold; and the controller is further configured to determine the parity level and set the redundancy level to the parity level in response to determining that the reliability measurement is equal to or less than the first reliability threshold but is greater than the second reliability threshold.
 3. The system of claim 2, wherein the controller is further configured to determine the mirroring level and set the redundancy level to the mirroring level in response to determining that the reliability measurement is equal to or less than the second reliability threshold.
 4. The system of claim 1, wherein when the redundancy level is set to the mirroring level, the number of copies of the data in the plurality of copies of the data corresponds to the mirroring level, and wherein the controller is further configured to store the plurality of copies of the data in the non-volatile memory.
 5. The system of claim 1, wherein when the redundancy level is set to the parity level, the controller is further configured to: create the plurality of parity data units associated with the data, wherein the number of parity data units in the plurality of parity data units corresponds to the parity level; and store the data along with the plurality of parity data units in the non-volatile memory.
 6. The system of claim 1, wherein the reliability measurement corresponds at least in part to a remaining usable life of the non-volatile memory.
 7. The system of claim 6, wherein the remaining usable life of the non-volatile memory corresponds at least in part to one of: a number of remaining program-erase cycles of the non-volatile memory or a number of read errors of the non-volatile memory.
 8. The system of claim 6, wherein: the non-volatile memory comprises multi-level cell solid-state memory; and the remaining usable life corresponds at least in part to an adjustment of at least one voltage threshold used for reading the multi-level cell memory.
 9. The system of claim 1, wherein the controller is further configured to: in response to determining that a write operation for storing the data in the non-volatile memory has not been initiated, store the data in the non-volatile memory using the set redundancy level; and in response to determining that the write operation has been initiated, store the data in the non-volatile memory using a previous redundancy level.
 10. The system of claim 1, wherein the controller is further configured to: in response to determining that a new data storage unit has been allocated for storing the data in the non-volatile memory, store the data in the non-volatile memory using the new data storage unit, the new data storage unit formatted according to the set redundancy level; and in response to determining that the new data storage unit has not been allocated for storing the data in the non-volatile memory, store the data in the non-volatile memory using a previously allocated data storage unit, the previously allocated data storage unit formatted according a previous redundancy level.
 11. The system of claim 1, further comprising a magnetic medium, wherein the controller is further configured to store the data in the magnetic medium in response to comparing the reliability measurement to a minimum reliability threshold.
 12. The system of claim 11, wherein the controller is configured to store the data in the magnetic medium in response to determining that the reliability measurement is equal to or less than the minimum reliability threshold.
 13. The system of claim 1, further comprising a bridge device coupled to the non-volatile memory, the bridge device comprising a signal processing subsystem, wherein the controller is configured to receive reliability information from the signal processing subsystem.
 14. A method of storing data in a data storage system comprising non-volatile solid-state memory and a controller, the method comprising: determining a reliability measurement of the non-volatile memory; adjusting a redundancy level used for storing data in the non-volatile memory based at least partly on comparing the reliability measurement to at least one reliability threshold and increasing the redundancy level when the reliability measurement has been determined to decrease when compared to the at least one reliability threshold; and storing the data in the non-volatile memory using the adjusted redundancy level, wherein increasing the redundancy level comprises: increasing a number of copies of the data in a plurality of copies of the data stored in the non-volatile memory when the redundancy level is set to a mirroring level, and increasing a number of parity data units in a plurality of parity data units associated with the data, the plurality of parity units stored in the non-volatile memory along with the data when the redundancy level is set to a parity level, and wherein the method is performed under control of the controller.
 15. The method of claim 14, further comprising determining the parity level or the mirroring level of the non-volatile memory and setting the redundancy level to the determined parity level or the determined mirroring level.
 16. The method of claim 14, wherein the at least one reliability threshold comprises a parity threshold, and wherein the method further comprises: in response to determining that the reliability measurement is equal to or less than the parity threshold, determining the parity level based at least in part on the reliability measurement and setting the redundancy level to the determined parity level.
 17. The method of claim 16, wherein the at least one reliability threshold further comprises a mirroring threshold that indicates lower reliability of the non-volatile memory than the parity threshold, and wherein the method further comprises: in response to determining that the reliability measurement is equal to or less than the mirroring threshold, determining the mirroring level based at least in part on the reliability measurement and setting the redundancy level to the determined mirroring level.
 18. The method of claim 17, further comprising: when the redundancy level is set to the mirroring level, storing the plurality of copies of the data in the non-volatile memory, the number of copies of the data in the plurality of copies of the data corresponding to the mirroring level; and when the redundancy level is set to the parity level: creating the plurality of parity data units associated with the data, wherein the number of parity data units in the plurality of parity data units corresponds to the parity level; and storing the data along with the plurality of parity data units in the non-volatile memory.
 19. The method of claim 14, further comprising increasing the redundancy level when the determined reliability measurement indicates a degradation of reliability of the non-volatile memory.
 20. The method of claim 14, wherein the reliability measurement corresponds to at least one of: a number of remaining program-erase cycles of the non-volatile memory or a number of read errors of the non-volatile memory.
 21. The method of claim 14, wherein the reliability measurement corresponds to an adjustment of programming algorithm parameters.
 22. The method of claim 14, further comprising: in response to determining that a write operation for storing the data in the non-volatile memory has not been initiated, storing the data in the non-volatile memory using the adjusted redundancy level; and in response to determining that the write operation has been initiated, storing the data in the non-volatile memory using a previous redundancy level.
 23. The method of claim 14, further comprising: in response to determining that a new data storage unit has been allocated for storing the data in the non-volatile memory, storing the data in the non-volatile memory using the new data storage unit, the new data storage unit formatted according to the set redundancy level; and in response to determining that the new data storage unit has not been allocated for storing the data in the non-volatile memory, storing the data in the non-volatile memory using a previously allocated data storage unit, the previously allocated data storage unit formatted according a previous redundancy level. 